package com.jy.api.dao;

import com.jy.api.domain.Notice;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.Date;
import java.util.List;

/**
 * Created by lihu on 2018/3/3.
 */
public interface NoticeDao extends CrudRepository<Notice, String> {


    List<Notice> findByAddTimeAfterAndStoreIdAndStatesOrderByAddTimeAsc(Date time, String storeId, boolean states);


    Page<Notice> findByStoreIdAndAddTimeAfter(String storeId, Date time, Pageable pageable);
}
